import service from "@/utils/request"

export interface DosageDetailsParameters{
    mtlName:string,
    mtlNo2:string,
    mtlSpec:string,
    mtlTypeNo:string,
    pageNum:number,
    pageSize:number,
    partName:string,
    styleColor:string,
    styleNo:string
}

export interface UsageDetailsDataInterface {
    total?: number,
    list: list[]
}

export interface list {
    styleNo: string,
    styleColor: string,
    seqNo: string,
    partName: string,
    segment: string,
    typeName: string,
    mtlNo2: string,
    mtlColor: string,
    mtlName: string,
    mtlSpec: string,
    mtlUnit: string,
    size1: null,
    size2: null,
    vendor: null,
    usage: number,
    usageType: string,
    remark:string
}

export const UsageDetailsData = (parms:DosageDetailsParameters) => {
    return service.post<any,UsageDetailsDataInterface>('/quotation/bomColor/getPcBomStyleColor',parms)
}

export interface laminatingMaterialInterface{
    subMtlNo: string,
    subMtlColor: string,
    subMtlName: string,
    subMtlSpec: null,
    subMtlUnit: string,
    prdType: null,
    percent: string,
    purFlag: string | Boolean
}

export interface DateList{
    list:laminatingMaterialInterface[]
}

export const laminatingMaterial = (mtlNo:string) => {
    return service.get<any,DateList>('/quotation/getPcBomStyleDetail',{
        params:{mtlNo:mtlNo}
    })
}
